package org.osomit.sacct.entity;

import org.json.simple.JSONObject;

import java.util.Map;


/**
 * 
 * @author Jian Fang (John.Jian.Fang@gmail.com)
 *
 * Date: Jun 28, 2009
 *
 */
public class RequestContext extends Entity {
    private static final long serialVersionUID = 3006803463479027827L;
    public final static String ENTITY_NAME = "RequestContext";

    public final static String LOCALE = "locale";
    private String locale;

    public final static String CLIENT_ID = "clientId";
    private String clientId;

    public final static String REQUEST_ID = "requestId";
    private String requestId;

    public String getLocale() {
        return locale;
    }

    public void setLocale(String locale) {
        this.locale = locale;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public JSONObject toJSON() {
        JSONObject obj = new JSONObject();

        obj.put(CLIENT_ID, this.clientId);
        obj.put(LOCALE, this.locale);
        obj.put(REQUEST_ID, this.requestId);

        return obj;  
    }
}
